import wx


class MyFrame(wx.Frame):

    def __init__(self, style):
        super().__init__(parent=None, id=-1, title="Frame sytle", pos=(400, 300), size=(800, 500), style=style)


class MyApp(wx.App):

    def OnInit(self):
        # self.frame = MyFrame(style=wx.DEFAULT_FRAME_STYLE)
        # self.frame = MyFrame(wx.CAPTION|wx.CLOSE_BOX) #显示标题,关闭按钮
        self.frame = MyFrame(wx.CLOSE_BOX | wx.FRAME_EX_CONTEXTHELP)

        # self.frame.SetShape(wx.Region(wx.Image("../resouce/wxPython.jpg").ConvertToBitmap()))

        self.frame.Show()
        self.SetTopWindow(self.frame)
        return True


if __name__ == '__main__':
    app = MyApp()
    app.MainLoop()
